package com.zhijiaoyun.dao;

import java.util.List;

import com.zhijiaoyun.dao.core.IBaseDao;
import org.apache.ibatis.annotations.Param;

import com.zhijiaoyun.model.Collection;

/**
 * @author shisfish
 * @date 2017/6/6
 */
public interface ICollectionDao extends IBaseDao<Collection> {

	/**
	 * get by ids
	 * @param relationId
	 * @param userId
	 * @param collectionType
	 * @return
	 */
	Collection selectByIds(@Param("relationId") Long relationId, @Param("userId") Long userId,
			@Param("collectionType") Integer collectionType);

	/**
	 * get by collectionId userId
	 * @param collectionId
	 * @param userId
	 * @return
	 */
	Collection selectByCollectionIdUserId(@Param("collectionId") Long collectionId, @Param("userId") Long userId);

	/**
	 * list by userId
	 * @param beginIndex
	 * @param pageSize
	 * @param userId
	 * @param collectionType
	 * @return
	 */
	List<Collection> selectByUserId(@Param("beginIndex") int beginIndex, @Param("pageSize") int pageSize,
			@Param("userId") Long userId, @Param("collectionType") int collectionType);

	/**
	 * count
	 * @param userId
	 * @param collectionType
	 * @return
	 */
	int countByParams(@Param("userId") long userId, @Param("collectionType") int collectionType);
}